<?php

class ErrorMessage {

    private $mErrors = array();
    private $mErrorSection;
    private $mErrorCode;


    public function SetErrorMessage($pLangId, $pErrorSection, $pErrorCode, $pErrorContainer, $pMessage) {
        $this->mErrors[$pLangId][$pErrorSection][$pErrorCode][$pErrorContainer] = $pMessage;
    }
    
    public function SetErrorSection($pValue) {
        $this->mErrorSection = $pValue;
    }

    public function SetErrorCode($pValue) {
        $this->mErrorCode = $pValue;
    }

    public function GetErrorSection() {
        return $this->mErrorSection;
    }

    public function GetErrorCode() {
        return $this->mErrorCode;
    }

    public function GetErrorMessage() {
        $tOutput = "<div class=\"Title\">" . $this->mErrors[DEFAULT_LANG][$this->mErrorSection][$this->mErrorCode]["TITLE"] . "</div>";
        $tOutput.= "<div class=\"Content\">" . $this->mErrors[DEFAULT_LANG][$this->mErrorSection][$this->mErrorCode]["CONTENT"] . "</div>";
        return $tOutput;
    }

    public function PrintErrorMessage() {
        echo $this->mErrors[DEFAULT_LANG][$this->mErrorSection][$this->mErrorCode];
    }

}

?>
